package com.gator.desig_mode.proxy;


/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc
 */
public class Client {

  public static void main(String[] args) {

    System.getProperties().put("sun.misc.ProxyGenerator.saveGeneratedFiles", "true");

    //创建代理对象和被代理对象
    ProxyFactory proxyFactory = new ProxyFactory(new TeacherDao());
    ITeacherDao iTeacherDao = (ITeacherDao) proxyFactory.getProxyInstance();
    iTeacherDao.teach();
  }

}
